import { defineStore } from "pinia";
import { ref } from "vue";

const usePageStore = defineStore(
  "pageStore",
  () => {
    const currentPage = ref("pages/index/index");
    const setCurrentPage = (val: string) => {
      currentPage.value = val;
    };
    return {
      currentPage,
      setCurrentPage,
    };
  },
  // {
  // persist: {
  //   storage: {
  //     setItem(key: string, value: string) {
  //       uni.setStorageSync(key, value);
  //     },
  //     getItem(key) {
  //       return uni.getStorageSync(key);
  //     },
  //   },
  // },
  // },
);

export default usePageStore;
